package topofstack.networkserverutils.bean;

import java.util.ArrayList;
import java.util.List;

public class TraceRouteInfo {
	public List<SiteInfo> sites;
	
	public TraceRouteInfo() {
		sites = new ArrayList<SiteInfo>();
	}
	
	public void add(String name, String ipAddress) {
		sites.add(new SiteInfo(name, ipAddress));
	}
	
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		
		for(SiteInfo site : sites) {
			builder.append(site.name + "\n");
			builder.append(site.ipAddress + "\n\n");
		}
		return builder.toString();
	}
}
